1 00:00:00,230 --> 00:00:01,070 Welcome. 2 00:00:01,070 --> 00:00:05,150 We're now going to set up our first place in our horror game, the lobby. 3 00:00:05,150 --> 00:00:07,850 So we're just going to need to create a new game. 4 00:00:07,850 --> 00:00:10,280 So for example I'll just do the base plate. 5 00:00:10,820 --> 00:00:14,060 And this place is going to be our starting place for the game. 6 00:00:14,060 --> 00:00:19,100 So any time a player joins our game, they're going to end up here, which is going to be our lobby. 7 00:00:19,100 --> 00:00:23,360 And because we're going to have multiple different places, we want this to be the starting place for 8 00:00:23,360 --> 00:00:24,380 all the players. 9 00:00:24,380 --> 00:00:27,830 So you can go ahead and save this game to Roblox. 10 00:00:28,620 --> 00:00:30,180 And you can name it whatever you'd like. 11 00:00:30,180 --> 00:00:32,250 I'm just going to call it horror game. 12 00:00:32,730 --> 00:00:34,530 Change around the settings a little bit. 13 00:00:34,530 --> 00:00:36,900 I'm just going to disable this for now. 14 00:00:38,040 --> 00:00:40,500 And then we can save our game to Roblox. 15 00:00:40,830 --> 00:00:45,360 And now, to get everything set up, I've attached a model to this lecture that's going to contain all 16 00:00:45,360 --> 00:00:47,340 the assets you will need for the lobby. 17 00:00:47,340 --> 00:00:51,570 So go ahead and grab that and you can go ahead and insert that model into our game. 18 00:00:51,570 --> 00:00:53,430 So it can open up our toolbox. 19 00:00:53,430 --> 00:00:56,910 We can go to the My model section. 20 00:00:56,910 --> 00:01:00,090 And you will find all of the assets we'll need for the game. 21 00:01:00,090 --> 00:01:04,380 So you can go ahead and take this and insert it into the game. 22 00:01:05,990 --> 00:01:07,220 There we go. 23 00:01:07,730 --> 00:01:10,190 So this is going to be all the assets for our game. 24 00:01:10,190 --> 00:01:14,930 We can go ahead and delete the original base plate in our game as well as the original spawn location. 25 00:01:15,620 --> 00:01:18,920 Now this model has a document which explains where everything needs to go. 26 00:01:18,920 --> 00:01:20,780 But we're also going to do that right here. 27 00:01:20,780 --> 00:01:26,060 So as you can see, we have a bunch of different models that we need to ungroup in different services. 28 00:01:26,060 --> 00:01:29,780 So we can go ahead and take this and ungroup it in the lighting service. 29 00:01:29,780 --> 00:01:32,690 So I'm going to delete everything that's in here already. 30 00:01:32,690 --> 00:01:36,590 And then I'm going to take this put it inside of the lighting service. 31 00:01:36,590 --> 00:01:39,230 And then I'm going to press control and U to ungroup it. 32 00:01:39,620 --> 00:01:42,440 We can do the same thing for this and replicated first. 33 00:01:42,440 --> 00:01:45,020 So put it in there and then do control and you. 34 00:01:45,950 --> 00:01:48,530 The next thing we need to do is replicated storage. 35 00:01:48,530 --> 00:01:50,180 So again control U. 36 00:01:50,180 --> 00:01:54,800 And we're just going to keep moving on Ungrouping all of these things that we need. 37 00:01:56,400 --> 00:02:01,260 And fortunately, all of these sound assets were going to be using came from the toolbox. 38 00:02:01,260 --> 00:02:04,710 So you won't have to worry about uploading any audio yourself. 39 00:02:05,040 --> 00:02:09,990 But we're just going to keep going on and ungrouping all of these different assets. 40 00:02:10,520 --> 00:02:13,460 This is going to go into starter player scripts. 41 00:02:13,460 --> 00:02:16,520 So open up starter player and put it in starter player scripts. 42 00:02:16,520 --> 00:02:21,590 Ungroup that and then this is going to be everything that exists within the workspace. 43 00:02:21,590 --> 00:02:24,530 So we can just put that in the workspace here and ungroup it. 44 00:02:25,110 --> 00:02:30,930 And for now, I'm going to go into the view and disable UI visibility so we don't have the guy on our 45 00:02:30,930 --> 00:02:31,500 screen. 46 00:02:32,310 --> 00:02:37,440 Now, the next thing we can do here is to go ahead and upload all of the animations we'll need for the 47 00:02:37,440 --> 00:02:39,870 lobby, and we don't need that many animations. 48 00:02:39,870 --> 00:02:44,790 All we'll need is the animation for our Squidward here inside of the restaurant. 49 00:02:44,790 --> 00:02:49,260 And then for our other Squidward that's out here, which is, yes, I believe this one. 50 00:02:49,260 --> 00:02:55,710 We just need the two idle animations to play for these, uh, different meshes we have here. 51 00:02:55,710 --> 00:03:00,900 So for this regular Squidward, as you can see, I have saved some animations in here, so you can go 52 00:03:00,900 --> 00:03:04,980 ahead and go to the avatar tab and we can open up our animation editor. 53 00:03:04,980 --> 00:03:08,160 I'm going to place it right here. 54 00:03:08,900 --> 00:03:11,060 And then we can go ahead and select our rig. 55 00:03:11,120 --> 00:03:14,720 And here we're going to have a bunch of different idalene animation. 56 00:03:14,720 --> 00:03:18,740 So this one's going to be our regular default idalene animation. 57 00:03:18,740 --> 00:03:21,050 And as you can see it loops. 58 00:03:21,050 --> 00:03:24,590 And the current animation is set at idle. 59 00:03:24,590 --> 00:03:26,810 And there's an event at the end here. 60 00:03:27,370 --> 00:03:29,020 Which let me. 61 00:03:29,020 --> 00:03:30,460 Yeah it's called ended. 62 00:03:30,460 --> 00:03:34,030 So when this animation ends we're going to randomly generate a number. 63 00:03:34,030 --> 00:03:39,010 And if that number is equal to some range then we're just going to randomly play another one of these 64 00:03:39,010 --> 00:03:40,030 Idalene animations. 65 00:03:40,030 --> 00:03:44,200 So I have some other random idle animations like Squidward looking around. 66 00:03:44,200 --> 00:03:47,290 We have one where I believe this one. 67 00:03:47,290 --> 00:03:47,470 Yeah. 68 00:03:47,470 --> 00:03:55,090 He looks up and looks down, scratches his head, and then this one we have where he just kind of scratches 69 00:03:55,090 --> 00:03:55,930 his nose. 70 00:03:56,800 --> 00:04:02,020 So you'll want to make sure to take all of these animation and publish them to your Roblox game. 71 00:04:02,020 --> 00:04:07,330 And you're going to want to copy each of these animation IDs, and you're going to go into your regular 72 00:04:07,330 --> 00:04:08,110 Squidward. 73 00:04:08,110 --> 00:04:14,410 And for the base idle animation, which is Idle animation one, you're going to paste that ID inside 74 00:04:14,410 --> 00:04:15,940 of this animation here. 75 00:04:15,940 --> 00:04:21,520 And then for the other three animations, you're just going to paste them each inside of these different 76 00:04:21,520 --> 00:04:23,050 animation instances. 77 00:04:23,650 --> 00:04:29,260 And then we're going to do the same thing as well for our handsome Squidward here. 78 00:04:29,260 --> 00:04:37,150 So you're going to again use the animation editor, select him, and the only animation we're going 79 00:04:37,150 --> 00:04:41,260 to need to load here for now is his idle animation, which is this one. 80 00:04:41,260 --> 00:04:43,210 So he's just standing and he's breathing. 81 00:04:43,420 --> 00:04:45,730 So you'll want to publish this one as well. 82 00:04:45,730 --> 00:04:52,810 Copy the ID and you'll want to place that inside of the idle and M one instance that is underneath our 83 00:04:52,810 --> 00:04:53,890 handsome Squidward. 84 00:04:54,400 --> 00:05:00,640 So once you have all of your animations uploaded for our regular Squidward and our handsome Squidward, 85 00:05:00,640 --> 00:05:06,790 and you've pasted each of their IDs into their respective animation instances, the next thing we could 86 00:05:06,790 --> 00:05:10,210 do is to change some properties in the lighting service. 87 00:05:10,210 --> 00:05:15,730 So if we open up this read Me module script right here, I've listed the different settings you'll want 88 00:05:15,730 --> 00:05:17,470 to change within the lighting service. 89 00:05:17,470 --> 00:05:19,000 So let's go to the lighting service. 90 00:05:19,000 --> 00:05:22,510 First we want to change the ambient to be completely pitch black. 91 00:05:22,510 --> 00:05:25,150 We want to have the brightness to be at zero. 92 00:05:25,180 --> 00:05:29,080 We don't need to change the color shift bottom or top the environment. 93 00:05:29,080 --> 00:05:31,930 Diffuse scale can be something around like 0.5. 94 00:05:31,930 --> 00:05:35,380 And then for the specular scale we can do something like 0.4. 95 00:05:35,740 --> 00:05:38,110 Make sure global shadows are enabled. 96 00:05:38,110 --> 00:05:41,200 The outdoor ambient is also going to be pitch black. 97 00:05:41,740 --> 00:05:46,900 Shadow softness can stay at 0.2 and we want to change the technology to future. 98 00:05:47,630 --> 00:05:51,290 And then we can change the clock time to be in the middle of the night. 99 00:05:51,290 --> 00:05:57,740 So if we go back to our game, as you can see, it is completely dark outside and we've got a nice, 100 00:05:57,770 --> 00:06:01,820 uh, dimly lit kind of night setting for our game. 101 00:06:02,150 --> 00:06:07,250 Now, before we move on to scripting, in the next lecture, I'm going to quickly explain kind of how 102 00:06:07,250 --> 00:06:09,530 we're setting up these scripts in our game. 103 00:06:09,530 --> 00:06:13,610 So we're going to have one server script and one local script. 104 00:06:13,610 --> 00:06:18,200 And the server script is going to require a bunch of different module scripts. 105 00:06:18,200 --> 00:06:20,000 That's going to set up everything in our game. 106 00:06:20,000 --> 00:06:23,720 So if we go to server Script Service, there's a folder here called server. 107 00:06:23,900 --> 00:06:29,780 And we're going to have the server script here load all of the different module scripts that are going 108 00:06:29,780 --> 00:06:30,410 to exist here. 109 00:06:30,410 --> 00:06:32,360 So we're going to have different services. 110 00:06:32,360 --> 00:06:36,920 One's going to be for handling the creation of servers. 111 00:06:36,920 --> 00:06:40,580 And then one's going to be for handling things like animations. 112 00:06:40,580 --> 00:06:45,890 So this server script is going to go through and set up each of these different module scripts. 113 00:06:45,890 --> 00:06:50,930 And these module scripts in case they need to require other shared code that can be stored within the 114 00:06:50,930 --> 00:06:52,880 module section for the server. 115 00:06:53,150 --> 00:06:56,150 And then the same general idea can be applied to the client. 116 00:06:56,150 --> 00:07:01,910 We're going to have one local script here, and it's going to set up all of the different handlers we'll 117 00:07:01,910 --> 00:07:02,930 have for our game. 118 00:07:02,930 --> 00:07:09,110 And those different handlers can go ahead and require any modules that they need to get some code from. 119 00:07:09,200 --> 00:07:15,770 Currently, all of these are empty, and we're going to be setting these up in the next following lectures. 120 00:07:16,010 --> 00:07:19,940 Lastly, we're also going to have this local script here inside of replicated first. 121 00:07:19,940 --> 00:07:23,750 And this local script is going to handle our loading screen. 122 00:07:23,750 --> 00:07:27,470 And it's going to make sure that our game has been loaded. 123 00:07:27,470 --> 00:07:32,600 And it's going to make sure that the server has also finished setting up all of the different services, 124 00:07:32,600 --> 00:07:38,000 or requiring all the different module scripts it needs before we actually start executing and setting 125 00:07:38,000 --> 00:07:39,590 up things on the client. 126 00:07:40,190 --> 00:07:42,170 Otherwise, we've gotten everything set up. 127 00:07:42,170 --> 00:07:45,080 All we need to do now is to get started scripting. 128 00:07:45,080 --> 00:07:47,480 So I'll go ahead and see you in the next lecture.